Skip to content

Update critical nodes endpoint curl examples#23368

Open
rmloveland wants to merge 3 commits into
mainfrom
20260518-DOC-17121-update-critical-nodes-endpoint-with-curl
Open

Update critical nodes endpoint curl examples#23368
rmloveland wants to merge 3 commits into
mainfrom
20260518-DOC-17121-update-critical-nodes-endpoint-with-curl

Conversation

@rmloveland
Copy link
Copy Markdown
Contributor

Fixes DOC-17121

Summary of changes:

  • Add a top-of-section request pattern for POST /_status/critical_nodes.
  • Show insecure HTTP and secure authenticated HTTPS curl examples.
  • Apply the clarification across all supported docs versions.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 18, 2026

Deploy Preview for cockroachdb-interactivetutorials-docs canceled.

Name Link
🔨 Latest commit 2eb4633
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-interactivetutorials-docs/deploys/6a0dfb54839a9100082c6218

@netlify
Copy link
Copy Markdown

netlify Bot commented May 18, 2026

Deploy Preview for cockroachdb-api-docs canceled.

Name Link
🔨 Latest commit 2eb4633
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-api-docs/deploys/6a0dfb5471649f0009e8b3c8

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 18, 2026

Cross-Version Link Check Passed

All cross-version link issues have been resolved. Good job!

@rmloveland rmloveland requested a review from stevendanna May 18, 2026 16:07
@rmloveland
Copy link
Copy Markdown
Contributor Author

rmloveland commented May 18, 2026

@stevendanna not really a very technical update but would appreciate your user POV re: is this easier to scan/find by a busy engineer during an escalation

PS they're all the same update so it's fine to just review e.g. the v26.2 one (or whichever)

@netlify
Copy link
Copy Markdown

netlify Bot commented May 18, 2026

Netlify Preview

Name Link
🔨 Latest commit 2eb4633
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-docs/deploys/6a0dfb54299438000848e45e
😎 Deploy Preview https://deploy-preview-23368--cockroachdb-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment on lines +204 to +222
#### Request the endpoint

To return the JSON response, send a `POST` request to `/_status/critical_nodes`.

For an insecure or local testing cluster, use HTTP:

{% include_cached copy-clipboard.html %}
~~~ shell
curl -X POST http://<host>:<http-port>/_status/critical_nodes
~~~

For a secure cluster, authenticate to the HTTPS endpoint with [`cockroach auth-session login`]({% link {{ page.version.version }}/cockroach-auth-session.md %}#log-in-to-the-http-interface), then pass the authentication cookie to `curl`.

{% include_cached copy-clipboard.html %}
~~~ shell
cockroach auth-session login <user> --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key
curl -X POST --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://<host>:<http-port>/_status/critical_nodes
~~~

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this! I wonder if this might be better more centralized somewhere since presumably these instructions work for all of the HTTP/HTTPS endpoints on this page?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the review!

ya that's a good point, i think i will move it to a new section called "authenticate to API endpoints" or something similar

Move curl authentication examples from the critical nodes endpoint
section into a new "Authenticate to API endpoints" section that
applies to all HTTP endpoints on the page. The critical nodes
section now references the shared section via anchor link.

Addresses review feedback from stevendanna on #23368.
@rmloveland rmloveland force-pushed the 20260518-DOC-17121-update-critical-nodes-endpoint-with-curl branch from 7de77e3 to 2eb4633 Compare May 20, 2026 18:20
@rmloveland rmloveland requested a review from a team May 20, 2026 18:20
@taroface taroface self-requested a review May 20, 2026 20:44
Copy link
Copy Markdown
Contributor

@taroface taroface left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just one syntax/style comment for the whole PR.


{% include_cached copy-clipboard.html %}
~~~ shell
curl http://<host>:<http-port>/<endpoint>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style note: We're using { } rater than < > unless this explicitly confuses the syntax.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants